logo

Notes and Conventions

Notes

  • This is an example R Markdown report to demonstrate the workflow for building a “data memo” or report object in parallel with the conduct of a RsNLME analysis.
  • We use html output and “tabsets” within the RMarkdown document to show how RsNLME can be used together with R markdown to produce very dense, interactive data summaries that capture a large amount of data in well organized, easily shared delivery mechanism.
  • We also show how RsNLME shiny apps generate code specific to your analysis problem that allows you to get the job done, even if you’re not an R expert!

Conventions used in this document

  • We’ve used blue text boxes to indicate descriptive information
  • We’ve used yellow text boxes to indicate results
  • Green text boxes provide key messages from the analysis results
  • Example: This is a key message statement
# Analysis ID     : Project XYZ Preliminary Population PK Analysis
# Purpose         : Initial Target Attainment Assessment
# Other Info      : Define your own!
library(flextable)
library(plotly)
library(DT)

Objectives

The purpose of this data memo is to provide a summary of the base population pharmacokinetic model fit for study XYZ.

Study Design

  • 150 healthy and infected male and female subjects were enrolled in this study at 3 centers under inpatient and outpatient settings
  • Subjects were administered 100 mg of Drug XYZ intravenously at time=0 and time=24
  • Blood samples were obtained at 0, 0.25, 0.5, 1, 2, 4, 6, 8, 12, and 24 hours after the first dose, and 12, and 24 hours after the second dose of Drug XYZ
  • Covariate effects were not explored during base model development.

Methods

  • Data analysis was conducted using the population pharmacokinetic program RsNLME version 1.1.0 (https://certara.github.io/R-RsNLME/index.html)
  • A scenario search was performed for a one, two, and three compartment model, with -2LL and AIC used and GOF plots evaluated to select the best model fit.
  • A one-compartment model with bolus input and first-order elimination from the central compartment was selected to model the time course of drug XYZ plasma concentrations. The parameters of this model were clearance (Cl), volume of distribution of the central compartment (V).

Overview of the data

Summary

  • Elimination profile appears to be bi-exponential
  • Body weight and gender appear to influence PK

Data

library(DT)
finaldat <- read.csv(file='./data/finaldat.csv')
DT::datatable(finaldat, rownames = FALSE, filter = "top", 
          options = list(pageLength = 5, scrollX = TRUE))



Demographics Table

dm_table <- readRDS(file='./tables/dmtable.RDS')
dm_table

Characteristic

N

N = 1501

AGE

150

50.5 (38.0 - 61.0)

SEX

150

F

45 (30%)

M

105 (70%)

RACE

150

ASIAN

21 (14%)

BLACK

36 (24%)

OTHER

33 (22%)

WHITE

60 (40%)

WT

150

71 (55 - 94)

1Mean (Range); n (%)



Mean Concentration

mean_conctable <- readRDS(file='./tables/mean_conctable.RDS')
mean_conctable
Mean Concentration by Dose Group and Time

Dose Group

Time (hr)

5000 μg

10000 μg

20000 μg

0.00

0 (0-0)

0 (0-0)

0 (0-0)

0.25

19.5 (5.19-56.4)

38.8 (4.77-111)

58.3 (6.83-164)

0.50

32.6 (9.88-84.3)

64.9 (19-167)

96.9 (27.9-247)

1.00

48.1 (17.2-119)

96.3 (30.6-235)

144 (41.1-349)

2.00

56.2 (17.7-116)

112 (32.7-236)

169 (51.7-352)

3.00

55.8 (19.8-118)

112 (37.7-235)

167 (56-348)

4.00

51.7 (15.4-131)

103 (27.5-264)

155 (37.8-400)

6.00

41.2 (9.77-91.4)

82.4 (14.3-182)

124 (21.9-270)

8.00

34.7 (9.36-67)

69.9 (21.7-136)

104 (29.8-199)

12.00

25 (2.98-69.8)

49.6 (5.06-140)

75.8 (8.52-208)

16.00

18.7 (1.08-57.5)

37.5 (0-115)

56.8 (0-169)

24.00

9.52 (0.103-32.9)

19.3 (0-67.3)

28.1 (0-99.8)



Time Concentration by Subject

  • Disposition appears bi-exponential
time_conc <- readRDS(file='./plots/time_concentration_by_subject.RDS')
time_conc
time_conc <- readRDS(file='./plots/time_concentration_by_subject.RDS')
time_conc |>
  plotly::ggplotly()



Facet Dose Group

  • Possible gender difference in PK with observed concentrations higher in females
time_conc_dose_grp <- readRDS(file='./plots/time_concentration_facet_dose_group.RDS')
time_conc_dose_grp
time_conc_dose_grp <- readRDS(file='./plots/time_concentration_facet_dose_group.RDS')
time_conc_dose_grp |> 
  plotly::ggplotly()



Facet WT Linear

  • Possible WT influence on PK with higher concentrations in lower body weight subjects
time_conc_wt <- readRDS(file='./plots/time_concentration_by_subject_by_wt_cut.RDS')
time_conc_wt
time_conc_wt <- readRDS(file='./plots/time_concentration_by_subject_by_wt_cut.RDS')
time_conc_wt |> 
  plotly::ggplotly()

Base Model Development

Model Overview by Number of Compartments

  • A one, two, and three compartment model was run.
  • The 1 compartment model was selected.
## View the overall tables
overall_table_cmpt_scenarios <- readRDS("./tables/overall_table_cmpt_scenarios.RDS")
overall_table_cmpt_scenarios

Model

-2LL

AIC

BIC

nParm

nObs

nSub

EpsShrinkage

OneCpt

13,488.16

13,502.16

13,540.02

7

1,650

150

0.12219

TwoCpt

13,489.52

13,511.52

13,571.01

11

1,650

150

0.12263

ThreeCpt

13,487.59

13,517.59

13,598.72

15

1,650

150

0.12203

GOF Plots

DV vs PRED

dvpred <- readRDS("./plots/one_cmpt_dv_preds_idv.RDS")
dvpred
dvpred <- readRDS("./plots/one_cmpt_dv_preds_idv.RDS")
dvpred |>
  plotly::ggplotly()

CWRES vs PRED

cwrespred <- readRDS("./plots/one_cmpt_res_vs_pred.RDS")
cwrespred
cwrespred <- readRDS("./plots/one_cmpt_res_vs_pred.RDS")
cwrespred |> 
  plotly::ggplotly()

Parameter Estimates

Thetas

table_theta <- readRDS("./tables/one_cmpt_theta.RDS")
table_theta
Table Theta

Name

Label

Value

SE

RSE%

2.5% CI

97.5% CI

THETA(1)

tvKa

1.17

0.03

2.95

1.11

1.24

THETA(2)

tvV

81.46

2.95

3.62

75.68

87.24

THETA(3)

tvCl

7.95

0.41

5.16

7.15

8.76

Omegas

table_omega <- readRDS("./tables/one_cmpt_omega.RDS")
table_omega
Table Omega

Name

Label

Value

SE

RSE%

Fixed

Diagonal

2.5% CI

97.5% CI

Shrinkage%

OMEGA(1,1)

nKa

0.081

0.014

17.625

FALSE

TRUE

0.053

0.109

21.728

OMEGA(2,2)

nV

0.178

0.023

12.805

FALSE

TRUE

0.134

0.223

3.356

OMEGA(3,3)

nCl

0.372

0.039

10.430

FALSE

TRUE

0.296

0.448

2.413

Sigmas

table_sigma <- readRDS("./tables/one_cmpt_sigma.RDS")
table_sigma
Table Sigma

Name

Label

Value

SE

RSE%

Fixed

2.5% CI

97.5% CI

Shrinkage%

SIGMA(1,1)

CEps

0.207

0.010

4.783

FALSE

0.187

0.226

12.219

Session Info

sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] DT_0.28         plotly_4.10.2   ggplot2_3.4.2   flextable_0.9.2

loaded via a namespace (and not attached):
 [1] httr_1.4.6              sass_0.4.6              tidyr_1.3.0            
 [4] jsonlite_1.8.5          viridisLite_0.4.2       splines_4.2.1          
 [7] bslib_0.5.0             shiny_1.7.4             askpass_1.1            
[10] fontLiberation_0.1.0    yaml_2.3.7              gdtools_0.3.3          
[13] pillar_1.9.0            lattice_0.20-45         glue_1.6.2             
[16] uuid_1.1-0              digest_0.6.31           promises_1.2.0.1       
[19] polyclip_1.10-4         colorspace_2.1-0        Matrix_1.5-4.1         
[22] htmltools_0.5.5         httpuv_1.6.11           gfonts_0.2.0           
[25] fontBitstreamVera_0.1.1 pkgconfig_2.0.3         httpcode_0.3.0         
[28] purrr_1.0.1             xtable_1.8-4            scales_1.2.1           
[31] tweenr_2.0.2            later_1.3.1             officer_0.6.2          
[34] fontquiver_0.2.1        ggforce_0.4.1           tibble_3.2.1           
[37] openssl_2.0.6           mgcv_1.8-40             generics_0.1.3         
[40] farver_2.1.1            ellipsis_0.3.2          cachem_1.0.8           
[43] withr_2.5.0             lazyeval_0.2.2          cli_3.6.1              
[46] magrittr_2.0.3          crayon_1.5.2            mime_0.12              
[49] evaluate_0.21           fansi_1.0.4             nlme_3.1-157           
[52] MASS_7.3-60             xml2_1.3.4              textshaping_0.3.6      
[55] tools_4.2.1             data.table_1.14.8       lifecycle_1.0.3        
[58] munsell_0.5.0           zip_2.3.0               compiler_4.2.1         
[61] jquerylib_0.1.4         xpose_0.4.16            systemfonts_1.0.4      
[64] rlang_1.1.1             grid_4.2.1              rstudioapi_0.14        
[67] htmlwidgets_1.6.2       crosstalk_1.2.0         labeling_0.4.2         
[70] rmarkdown_2.23          gtable_0.3.3            curl_5.0.1             
[73] R6_2.5.1                knitr_1.43              dplyr_1.1.2            
[76] fastmap_1.1.1           utf8_1.2.3              ragg_1.2.5             
[79] crul_1.4.0              Rcpp_1.0.10             vctrs_0.6.3            
[82] tidyselect_1.2.0        xfun_0.39